<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>登录</title>
    <meta charset="UTF-8">
    <script src="qrc:///qtwebchannel/qwebchannel.js"></script>
    <script>
        let Bridge = null;
        new QWebChannel(parent.qt.webChannelTransport, function (channel) {
            Bridge = channel.objects.Bridge;
        });

        function login() {
            const username = document.getElementById("username").value;
            const password = document.getElementById("password").value;
            Bridge.login(username, password);
        }
    </script>
</head>
<body>
<h2>Login</h2>
<!--TODO: 调整登录界面-->
<div> <label for="username">用户名:</label><input id="username" placeholder="Username"/> </div>
<div> <label for="password">密码:</label><input id="password" type="password" placeholder="Password"/> </div>
<div> <button onclick="login()">Login</button> </div>
</body>
</html>
